(function(){"use strict";BX.namespace("BX.Landing");var e=BX.Landing.Utils.onCustomEvent;BX.Landing.BlockHeaderSidebar=function(){this.entries=[];this.observer=new IntersectionObserver(BX.Landing.BlockHeaderSidebar.onIntersection,this.getObserverOptions())};BX.Landing.BlockHeaderSidebar.onIntersection=function(e){e.forEach(function(e){})};BX.Landing.BlockHeaderSidebar.prototype={getObserverOptions:function(){return{threshold:[0,1]}},add:function(n){this.node=n;this.wrapper=BX.findParent(this.node,{className:"block-wrapper"});this.wrapper.style.position="sticky";this.wrapper.style.top="-1px";this.wrapper.style.transitionProperty="top";this.wrapper.style.transitionDuration=".2s";this.observer.observe(this.wrapper);e("BX.Landing.BlockAssets.Header:onSetOnTop",function(e){console.log("event set",e.data.height);this.wrapper.style.top=e.data.height+"px"}.bind(this));e("BX.Landing.BlockAssets.Header:onUnsetOnTop",function(e){console.log("event UNSET",e.data.height);this.wrapper.style.top=e.data.height+"px"}.bind(this));e("BX.Landing.BlockAssets.Header:onSetInFlow",function(e){console.log("event onSetInFlow",e.data.height);this.wrapper.style.top="0px"}.bind(this))},getEntryByIntersectionTarget:function(e){var n=null;this.entries.forEach(function(t){if(e===t.getNodeForObserve()){n=t;return true}});return n},hidePrevEntriess:function(){}};BX.Landing.BlockHeaderSidebar.getInstance=function(){return BX.Landing.BlockHeaderSidebar.instance||(BX.Landing.BlockHeaderSidebar.instance=new BX.Landing.BlockHeaderSidebar)};var n=BX.Landing.BlockHeaderSidebar.getInstance();e("BX.Landing.Block:init",function(e){var t=e.makeRelativeSelector(".landing-block-node-navbar");if(BX.Landing.getMode()==="view"&&e.block.querySelectorAll(t).length>0){n.add(e.block.querySelector(".landing-block-node-navbar"))}})})();
//# sourceMappingURL=header-sidebar-test.map.js